// mobile.js
document.addEventListener('DOMContentLoaded', function() {
    // 防止触摸延迟
    FastClick.attach(document.body);
    
    // 触摸滑动处理
    let startX, startY;
    
    document.addEventListener('touchstart', function(e) {
        startX = e.touches[0].clientX;
        startY = e.touches[0].clientY;
    }, false);
    
    document.addEventListener('touchmove', function(e) {
        if (!startX || !startY) return;
        
        let diffX = startX - e.touches[0].clientX;
        let diffY = startY - e.touches[0].clientY;
        
        if (Math.abs(diffX) > Math.abs(diffY)) {
            // 水平滑动
            if (diffX > 0) {
                // 向左滑动
            } else {
                // 向右滑动
            }
        }
        
        startX = null;
        startY = null;
        e.preventDefault();
    }, false);
});